home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / fx / fxAllocateImageBuffers.z / fxAllocateImageBuffers
Encoding:
Text File  |  1998-10-20  |  9.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))                    ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss, ddddmmmmFFFFXXXXFFFFrrrreeeeeeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss - create and destroy image
  10.      buffers for special effects
  11.  
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ffffxxxx____bbbbuuuuffffffffeeeerrrr....hhhh>>>>
  15.  
  16.      DDDDMMMMssssttttaaaattttuuuussss ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss
  17.            (((( DDDDiiiissssppppllllaaaayyyy**** ddddppppyyyy,,,,
  18.              ccccoooonnnnsssstttt DDDDMMMMppppaaaarrrraaaammmmssss**** iiiimmmmaaaaggggeeeeFFFFoooorrrrmmmmaaaatttt,,,,
  19.              iiiinnnntttt iiiinnnnppppuuuuttttUUUUssssaaaaggggeeee,,,,
  20.              iiiinnnntttt oooouuuuttttppppuuuuttttUUUUssssaaaaggggeeee,,,,
  21.              iiiinnnntttt nnnnuuuummmmbbbbeeeerrrrOOOOffffBBBBuuuuffffffffeeeerrrrssss,,,,
  22.              DDDDMMMMffffxxxxbbbbuuuuffffffffeeeerrrr**** rrrreeeettttuuuurrrrnnnnBBBBuuuuffffffffeeeerrrrssss[[[[]]]] ))))
  23.  
  24.      vvvvooooiiiidddd ddddmmmmFFFFXXXXFFFFrrrreeeeeeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss
  25.            (((( iiiinnnntttt nnnnuuuummmmbbbbeeeerrrrOOOOffffBBBBuuuuffffffffeeeerrrrssss,,,,
  26.              DDDDMMMMffffxxxxbbbbuuuuffffffffeeeerrrr**** bbbbuuuuffffffffeeeerrrrssss[[[[]]]] ))))
  27.  
  28.  
  29. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  30.      _d_p_y               An open connection to an X server.  Used to create
  31.                        off-screen render areas for OpenGL.  The caller must
  32.                        not close the display connection until all of the
  33.                        DMfxbuffers have been freed.
  34.  
  35.      _i_m_a_g_e_F_o_r_m_a_t       A complete image format parameter list (see
  36.                        ddddmmmmSSSSeeeettttIIIImmmmaaaaggggeeeeDDDDeeeeffffaaaauuuullllttttssss((((3333ddddmmmm))))).  This format is used to
  37.                        determine how large the buffers need to be.
  38.  
  39.      _i_n_p_u_t_U_s_a_g_e        Specifies the modes in which the buffer will be used as
  40.                        input; says how the image will be read from the buffer
  41.                        and used as input to a plug-in or application.  The
  42.                        value is a bitwise combination of one or more of:
  43.                        bbbbuuuuffffIIIInnnnppppuuuuttttDDDDiiiirrrreeeecccctttt, bbbbuuuuffffIIIInnnnppppuuuuttttTTTTeeeexxxxttttuuuurrrreeee, bbbbuuuuffffIIIInnnnppppuuuuttttDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss,
  44.                        bbbbuuuuffffIIIInnnnppppuuuuttttMMMMoooovvvviiiieeee.  The options set must include all of the
  45.                        different ways in which the buffer will be used.
  46.  
  47.      _o_u_t_p_u_t_U_s_a_g_e       Specifies the modes in which the buffer will be used as
  48.                        output; says how the image will be placed into the
  49.                        buffer by a plug-in or application.  the value is a
  50.                        bitwise combination of one or more of bbbbuuuuffffOOOOuuuuttttppppuuuuttttDDDDiiiirrrreeeecccctttt,
  51.                        bbbbuuuuffffOOOOuuuuttttppppuuuuttttOOOOppppeeeennnnGGGGLLLL, bbbbuuuuffffOOOOuuuuttttppppuuuuttttmmmmoooovvvviiiieeee.  The options set must
  52.                        include all of the different ways in which the buffer
  53.                        will be used.
  54.  
  55.      _n_u_m_b_e_r_O_f_B_u_f_f_e_r_s   The number of buffers to be allocated or freed.
  56.  
  57.      _r_e_t_u_r_n_B_u_f_f_e_r_s     A pointer to an array of DDDDMMMMffffxxxxbbbbuuuuffffffffeeeerrrr****, which will be
  58.                        filled in.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))                    ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      _b_u_f_f_e_r_s           A pointer to an array of DDDDMMMMffffxxxxbbbbuuuuffffffffeeeerrrr****.
  75.  
  76.  
  77. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  78.      ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss creates buffers for use with the special-effects
  79.      plugin manager.  The buffers it creates can be used to efficiently pass
  80.      images to an from image processing plugins.
  81.  
  82.      The input and output usage given are used to determine the
  83.      characteristics of the buffers to be allocated.  For example, when the
  84.      bbbbuuuuffffOOOOuuuuttttppppuuuuttttOOOOppppeeeennnnGGGGLLLL bit is set, the buffers created will be suitable for
  85.      OpenGL rendering.  An application can determine values for input and
  86.      output usage by examining the input and output usage of all of the
  87.      plugins to be used and or-ing them together.
  88.  
  89.      On many SGI machines, image buffers for special effects processing take
  90.      advantage of special hardware resources associated with graphical
  91.      rendering.  These resources are frequently in short supply.  An
  92.      application that uses special effects should avoid holding image buffers
  93.      unnecessarily.  For example, when the application is iconized, it should
  94.      release these image buffers.
  95.  
  96.  
  97. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
  98.      ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss will either create all of the buffers requested
  99.      and return DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS, or will create no buffers and return DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE.
  100.      In the case of failure, error information can be obtained from
  101.      ddddmmmmGGGGeeeettttEEEErrrrrrrroooorrrr((((3333ddddmmmm)))).
  102.  
  103.  
  104. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  105.      This will combine the usage bits for a number of filter plugins and then
  106.      a pair of buffers that can be used with any of them:
  107.  
  108.          DMparams* imageFormat;
  109.          DMplugin* plugins[];
  110.          int pluginCount;
  111.          int in;   /* combined input usage  */
  112.          int out;  /* combined output usage */
  113.          int i;
  114.          DMfxbuffer buffers[2];
  115.  
  116.          /* get the list of plugins to use */
  117.          ...
  118.  
  119.          /* combine the usage bits of all of the plugins */
  120.          in  = 0;
  121.          out = 0;
  122.          for ( i = 0;  i < pluginCount;  i++ )
  123.          {
  124.              in  |= pmGetSourceAUsage( plugins[i] );
  125.              out |= pmGetDestUsage   ( plugins[i] );
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))                    ddddmmmmFFFFXXXXAAAAllllllllooooccccaaaatttteeeeIIIImmmmaaaaggggeeeeBBBBuuuuffffffffeeeerrrrssss((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.          }
  141.  
  142.          /* allocate two buffers */
  143.          if ( dmFXAllocateImageBuffers( imageFormat, in, out, 2,
  144.                   buffers ) != DM_SUCCESS )
  145.          {
  146.              /* allocation failed */
  147.          }
  148.  
  149.  
  150. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  151.      dmFXMovieRenderImage(3dm), dmFXSetupInputImageBuffer(3dm),
  152.      dmFXSetupScanlineBuffer(3dm), dmGetError(3dm).
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.